﻿<%@ Page Language="C#" Theme="WebMaster" MasterPageFile="~/WebMaster/MasterPage.master" AutoEventWireup="true" CodeFile="AdvertiseAdd.aspx.cs" Inherits="webapp4U.UI.WebMaster_Default" %>
<%@ Register Src="~/WebMaster/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">

<uc:Title runat="server" ResourceKey='Logo_LogoAdd'  />

  <table border="0" align="center" height="400px;">
    <tr>
        <td style="padding-top:5pt" align="left" valign="top">
            <asp:Panel runat="server" ID="PanelMsg" Visible="false">
                <asp:Label runat="server" ID="lblMsg" CssClass="lblMsg" />
            </asp:Panel>
            
        
        <asp:ValidationSummary runat="server" ID="valChangePasswordSummary"  ShowMessageBox="true" ShowSummary="false" />			
        
        <table align="left" border="0" cellpadding="6">
            <tr>
                <td>
                </td>
                <td><%=GetAdvertise()%></td>
            </tr>
            <tr id="Tr1" runat="server">
                <td align="right"><b>Logo:</b></td>
                <td>
                    <asp:HiddenField runat="server" ID="hImage" />
                    <asp:FileUpload runat="server" ID="PhotoFile" Width="255" CssClass="Textbox" />
                    <asp:RequiredFieldValidator runat="server" 
                        ID="Rqfvfileupload" 
                        ControlToValidate="PhotoFile"  
                        ErrorMessage="Logo not null" 
                        Display="none">
                    </asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr id="Tr2" runat="server">
                <td align="right"><b>Loại:</b></td>
                <td>
                    <asp:DropDownList runat="server" ID="dlCategory" Width="105" CssClass="Textbox">
                        <asp:ListItem Text="Trang chủ" Value="0"></asp:ListItem>
                        <asp:ListItem Text="Trang con" Value="1"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            
            <tr>
                <td align="right"><b>Rộng:</b></td>
                <td>
                    <asp:TextBox runat="server" ID="txtWidth" Width="100" Text="0"></asp:TextBox>
                    <asp:RegularExpressionValidator runat="server" SetFocusOnError="true" 
                         ID="RegularExpressionValidator2" 
                         ControlToValidate="txtWidth" 
                         ValidationExpression="^(([0-9])+)$" 
                         ErrorMessage="Width phải là kiểu số nguyên" 
                         Display="none">
                    </asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right"><b>Cao:</b></td>
                <td>
                    <asp:TextBox runat="server" ID="txtHeight" Width="100" Text="0"></asp:TextBox>
                    <asp:RegularExpressionValidator runat="server" SetFocusOnError="true" 
                         ID="RegularExpressionValidator3" 
                         ControlToValidate="txtHeight" 
                         ValidationExpression="^(([0-9])+)$" 
                         ErrorMessage="Height phải là kiểu số nguyên" 
                         Display="none">
                    </asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right"><b>Địa chỉ liên kết:</b></td>
                <td>
                    <asp:TextBox ID="txtUrl" Font-Bold="true" runat="server" Width="250" MaxLength="700"></asp:TextBox>
                    <asp:RequiredFieldValidator runat="server" 
                        ID="RequiredFieldValidator1" 
                        ControlToValidate="txtUrl" 
                        ErrorMessage="Url not null" 
                        SetFocusOnError="true" Display="none">
                    </asp:RequiredFieldValidator>
                </td>
            </tr>
            
            <tr class="Hidden">
                <td><b>RegionDate:</b></td>
                <td>
                    <asp:TextBox ID="txtRegionDate" Font-Bold="true" runat="server" Width="255" MaxLength="700"></asp:TextBox>
                </td>
            </tr>
            
            <tr class="Hidden">
                <td><b>ExpireDate:</b></td>
                <td>
                    <asp:TextBox ID="txtExpireDate" Font-Bold="true" runat="server" Width="250" MaxLength="700"></asp:TextBox>
                </td>
            </tr>
            
            
            <tr>
                <td align="right"><b><%=ResourceManager.GetString("Logo_Position") %>: </b></td>
                <td>
                    <webapp4U:ddlPosition runat="server" ID="dlPosition" CssClass="Textbox" Width="255" />
                    <asp:RangeValidator runat="server" ControlToValidate="dlPosition" ID="rvl1" Type="Integer" MinimumValue="0" MaximumValue="1000" Display="none" ErrorMessage="Position Not null" CssClass="error"/>
                </td>
            </tr>
            
            <tr>
                <td align="right"><b><%=ResourceManager.GetString("DisplayOrder") %>:</b></td>
                <td>
                    <asp:TextBox ID="txtOrder" Font-Bold="true" runat="server" Width="250" MaxLength="700" Text="0"></asp:TextBox>
                    <asp:RegularExpressionValidator runat="server" SetFocusOnError="true" 
                         ID="RegularExpressionValidator1" 
                         ControlToValidate="txtOrder" 
                         ValidationExpression="^(([0-9])+)$" 
                         ErrorMessage="Vị trí sắp xếp phải là kiểu số nguyên" 
                         Display="none">
                    </asp:RegularExpressionValidator>
                </td>
            </tr>
            
            <tr>
                <td align="right" colspan="2" valign="middle">
                    <webapp4U:LinkButton2  ResourceName='Save' ID="btSave" runat="server" OnClick="btSave_Click" />
                </td>
            </tr>
       </table>
        </td>
    </tr>
</table>                


</asp:Content>

